package com.pin.zheng.xingmulibrary.util;

public class DynamicCode {
    public static String getDynamicCode() {
        String dynamicCode = "";
        int second = StringUtil.getSecond();
        int minute = StringUtil.getMinute();
        int month = StringUtil.getMonth();
        int day = StringUtil.getDayOfMonth();
        int hour = StringUtil.getHourOfDay();
        int year = StringUtil.getYear() % 1000;
        dynamicCode = StringUtil.addZeroForNum(Integer.toHexString(second + 11), 2) + StringUtil.addZeroForNum(Integer.toHexString(minute * 2), 2) + StringUtil.addZeroForNum(Integer.toHexString(month * 12), 2) +
                StringUtil.addZeroForNum(Integer.toHexString(day + day), 2) + StringUtil.addZeroForNum(Integer.toHexString(hour + 24), 2) + StringUtil.addZeroForNum(Integer.toHexString(year), 2);
        return dynamicCode;
    }

}
